<%@page import="com.balloon.logic.*,java.util.*;"%>


<html>
    <head>
        <title>IBallon Personal Page</title>
        <link type="text/css" href="css/jquery.ui.all.css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery-1.4.2.js"></script>
        <script type="text/javascript" src="js/jquery.ui.core.js"></script>
        <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="js/jquery.ui.tabs.js"></script>
        <script type="text/javascript" src="js/validate.js"></script>
        <link type="text/css" href="css/demos.css" rel="stylesheet" />
        <script type="text/javascript">
            $(function() {
                $("#tabs").tabs();
                $("#profileform").validate({
                    rules: {
                        newpwd: "required",
                        renewpwd: {
                            equalTo: "#newpwd"
                        }
                    }
                });
            });
            function send(){
                document.vendor.action="Vendor.do";
                document.vendor.submit();
            }
        </script>
    </head>
    <body>
        <%! UserBean current;%>
        Welcome <%
                    current = (UserBean) session.getAttribute("currentuser");
                    out.println(current.getEmailAddress());
        %>
        <a href="MainPage.jsp?useremail=<%=current.getEmailAddress()%>" >Back to main page</a>
        <div class="demo">
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">All Footprint</a></li>
                    <li><a href="#tabs-2">All Focus</a></li>
                    <li><a href="#tabs-3">All Comments</a></li>
                </ul>
                <div id="tabs-1">
                    <h3>Visited Places</h3>
                    <table>
                        <tr>
                            <td>City Name</td>
                            <td>Comments</td>
                        </tr>
                        <% ArrayList<UserVisitedPlace> temp = current.getVisitedPlaces();

                                    for (int i = 0; i < temp.size(); i++) {
                                        out.println("<tr>");
                                        out.println("<td>");
                                        out.println(temp.get(i).getObject());
                                        out.println("</td>");
                                        out.println("<td>");
                                        out.println(temp.get(i).getTime());
                                        out.println("</td>");
                                        out.println("</tr>");
                                    }

                        %>
                    </table>
                </div>
                <div id="tabs-2">
                    <p>gula in ligula suscipit aliquam. Praesentonsequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
                </div>
                <div id="tabs-3">
                    <h3>City</h3>
                    <table>
                        <tr>
                            <td>City Name</td>
                            <td>Comments</td>
                        </tr>
                        <% ArrayList<UserComments> temp2 = current.getComments();

                                    for (int i = 0; i < temp2.size(); i++) {
                                        out.println("<tr>");
                                        out.println("<td>");
                                        out.println(temp2.get(i).getObject());
                                        out.println("</td>");
                                        out.println("<td>");
                                        out.println(temp2.get(i).getDescription());
                                        out.println("</td>");
                                        out.println("</tr>");
                                    }

                        %>


                    </table>
                </div>
                
                


            </div>

        </div><!-- End demo -->

        <div class="demo-description">



        </div><!-- End demo-description -->

    </body>
</html>